﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QuickApp.MVCControl
{
    /// <summary>
    /// 用户的服务类
    /// </summary>
    public interface IUserService
    {
        /// <summary>
        /// 获取SSO登陆的用户ID
        /// </summary>
        /// <returns></returns>
        string GetSSOUserId();

        /// <summary>
        /// 获取指定用户标识的用户信息
        /// </summary>
        /// <param name="UserId">用户ID</param>
        /// <returns></returns>
        IUserInfo GetUserInfo(string userId);

        /// <summary>
        /// 判断用户是否拥有指定权限
        /// </summary>
        /// <param name="UserId">用户ID</param>
        /// <param name="rightCode">权限标识</param>
        /// <returns></returns>
        bool HasRight(string UserId, string rightCode);

        /// <summary>
        /// 判断用户是否在指定角色中
        /// </summary>
        /// <param name="UserId">用户ID</param>
        /// <param name="roleCode">角色标识</param>
        /// <returns></returns>
        bool IsInRole(string UserId, string roleCode);
    }
}
